sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
↳ QTRS
↳ Overlay + Local Confluence
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
CHOOSE(x, cons(v, w), 0, s(z)) → INSERT(x, w)
INSERT(x, cons(v, w)) → CHOOSE(x, cons(v, w), x, v)
SORT(cons(x, y)) → SORT(y)
SORT(cons(x, y)) → INSERT(x, sort(y))
CHOOSE(x, cons(v, w), s(y), s(z)) → CHOOSE(x, cons(v, w), y, z)
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
CHOOSE(x, cons(v, w), 0, s(z)) → INSERT(x, w)
INSERT(x, cons(v, w)) → CHOOSE(x, cons(v, w), x, v)
SORT(cons(x, y)) → SORT(y)
SORT(cons(x, y)) → INSERT(x, sort(y))
CHOOSE(x, cons(v, w), s(y), s(z)) → CHOOSE(x, cons(v, w), y, z)
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
CHOOSE(x, cons(v, w), 0, s(z)) → INSERT(x, w)
INSERT(x, cons(v, w)) → CHOOSE(x, cons(v, w), x, v)
CHOOSE(x, cons(v, w), s(y), s(z)) → CHOOSE(x, cons(v, w), y, z)
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
CHOOSE(x, cons(v, w), 0, s(z)) → INSERT(x, w)
INSERT(x, cons(v, w)) → CHOOSE(x, cons(v, w), x, v)
CHOOSE(x, cons(v, w), s(y), s(z)) → CHOOSE(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
CHOOSE(x, cons(v, w), 0, s(z)) → INSERT(x, w)
INSERT(x, cons(v, w)) → CHOOSE(x, cons(v, w), x, v)
CHOOSE(x, cons(v, w), s(y), s(z)) → CHOOSE(x, cons(v, w), y, z)
From the DPs we obtained the following set of size-change graphs:
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
SORT(cons(x, y)) → SORT(y)
sort(nil) → nil
sort(cons(x, y)) → insert(x, sort(y))
insert(x, nil) → cons(x, nil)
insert(x, cons(v, w)) → choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) → cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) → cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) → choose(x, cons(v, w), y, z)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
SORT(cons(x, y)) → SORT(y)
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
sort(nil)
sort(cons(x0, x1))
insert(x0, nil)
insert(x0, cons(x1, x2))
choose(x0, cons(x1, x2), x3, 0)
choose(x0, cons(x1, x2), 0, s(x3))
choose(x0, cons(x1, x2), s(x3), s(x4))
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
SORT(cons(x, y)) → SORT(y)
From the DPs we obtained the following set of size-change graphs: